package org.example;

public class ExprNode extends AST {

    public static final int tINVLIAD = 0; // 非法表达式
    public static final int tINTEGER = 1; // 整数表达式
    public static final int tVECTOR = 2; // 向量表达式

    int evalType;

    public int getEvalType()
    {
        return evalType;
    }

    public ExprNode(Token payload)
    {
        super(payload);
    }

    @Override
    public String toString() {
        if(evalType != tINVLIAD)
        {
            return super.toString() + "<type=" + (evalType == tINTEGER ? "tINTEGER" : "tVECTOR") + ">";
        }

        return super.toString();
    }
}
